
<template>
  <div class="layout">
    <Layout>
      <Header>
        <Menu mode="horizontal" theme="dark" active-name="api" @on-select="handleSelect">
          <div class="layout-logo">Logo</div>
          <div class="layout-nav">
            <MenuItem name="api">
              <Icon type="ios-globe-outline" />API管理
            </MenuItem>
            <MenuItem name="2">
              <Icon type="ios-keypad"></Icon>Item 2
            </MenuItem>
            <MenuItem name="3">
              <Icon type="ios-analytics"></Icon>Item 3
            </MenuItem>
            <MenuItem name="4">
              <Icon type="ios-paper"></Icon>Item 4
            </MenuItem>
          </div>
        </Menu>
      </Header>
      <router-view></router-view>
    </Layout>
  </div>
</template>

<script>
export default {
  methods:{
    handleSelect: function(name){
      alert(name)
    }
  },
  mounted(){
    this.$api.send('student_hi')
  }

};
</script>

<style scoped>
.layout-logo {
  width: 100px;
  height: 30px;
  line-height: 30px;
  background: #5b6270;
  border-radius: 3px;
  float: left;
  position: relative;
  top: 15px;
  left: 20px;
  text-align: center;
  color: #fff;
  font-size: 20px;
  font-family: -webkit-pictograph;
}

.layout-nav {
  width: 420px;
  margin: 0 auto;
  margin-right: 20px;
}
</style>

